<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改管理授权企业')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-corpinfo-edit" th:object="${corpInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">企业名称：</label>
                <div class="col-sm-8">
                    <input name="corpName" th:field="*{corpName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">纳税识别号：</label>
                <div class="col-sm-8">
                    <input name="nssbh" th:field="*{nssbh}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">信用代码：</label>
                <div class="col-sm-8">
                    <input name="ssxydm" th:field="*{ssxydm}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系人：</label>
                <div class="col-sm-8">
                    <input name="contact" th:field="*{contact}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系电话：</label>
                <div class="col-sm-8">
                    <input name="contactMbile" th:field="*{contactMbile}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">机器编码：</label>
                <div class="col-sm-8">
                    <input name="jqbm" th:field="*{jqbm}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">授权企业Id：</label>
                <div class="col-sm-8">
                    <input name="corpId" th:field="*{corpId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">授权业务：</label>
                <div class="col-sm-8">
                    <input name="bizId" th:field="*{bizId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">suiteTicket：</label>
                <div class="col-sm-8">
                    <input name="suiteTicket" th:field="*{suiteTicket}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">过期日：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="expireAt" th:value="${#dates.format(corpInfo.expireAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">accesstoken：</label>
                <div class="col-sm-8">
                    <input name="accessToken" th:field="*{accessToken}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">accesstoken过期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="tokenExpireAt" th:value="${#dates.format(corpInfo.tokenExpireAt, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/corpinfo";
        $("#form-corpinfo-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-corpinfo-edit').serialize());
            }
        }

        $("input[name='expireAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='tokenExpireAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>